package com.hantanger.weblog.dao;

import java.util.List;
import java.util.Map;

import com.hantanger.weblog.model.PostCount;
import com.hantanger.weblog.util.DaoHelper;

public class PostCountDao{

	public void insert(PostCount postCount) {
		update(postCount);
	}

	public void update(PostCount postCount) {
		DaoHelper.save(postCount);
	}

	public void delete(Long postId) {
		DaoHelper.delete(PostCount.class, postId);
	}

	public PostCount getPostCountById(Long postId) {
		return DaoHelper.get(PostCount.class, postId);
	}
	
	public Map<Long, PostCount> getPostCountMap(List<Long> postIds) {
		return DaoHelper.getMap(PostCount.class, postIds);
	}

}
